<?php
ob_start(); // 开启输出缓冲
// 先输出 HTML 或其他内容
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="img/sd.png">
<title>街灯</title>
<style>
	body{
	}
		@font-face {
			font-family:迷你简剪纸;
			src: url(ttf/迷你简剪纸_爱给网_aigei_com.ttf);
			}
			#wenzi{
				color: #ffffff;
				font-size: 25px;
				font-weight:bold;
				font-family: 迷你简剪纸;
			}
			#zhenwen2{
				font-size: 15px;
				font-weight:bold;
				font-family: 迷你简剪纸;
				color: #797979;
			}
			#buttoncolor{
				border:2px solid #fff;
			}
			#buttoncolor:hover{
				border:2px solid red;
			}
</style>
</head>
<font face:微软雅黑>
<body>
	<center>
	<div style="display: flex;padding: 15px 15px 15px 15px;margin:0px;">
		<div style="height: 35px;width: 10px;background-color: #00214f"></div>
		<p style="font-size: 25px;font-weight:bold;font-family: 微软雅黑;color: #000;margin: 0px 15px 0px 15px;padding: 0px;">登录 Login</p>
	</div>
	<!--第一部分-->
	<?php
		echo
		"<div style='height: auto;width: 800px;margin:0px 0px 15px 0px;padding: 5px 0px 15px 0px;text-align: left;'>".
			"<div style='text-align: left;display: flex;padding: 0px 15px 0px 15px;margin:15px 0px 0px 0px;height: 60px;'>".
				"<img src='http://q1.qlogo.cn/g?b=qq&nk=".$_COOKIE['jdQQ']."&s=640' style='width: 80px;height:80px;margin: 0px;padding: 0px;border: 1px solid #00214f;'/>".
				"<div style='margin: 0px 0px 0px 10px;'>".
					"<p style='height: 20px;margin: 0px;padding: 0px;color: #000000;font-size:20px;font-weight:bold;font-family: 微软雅黑;'>".$_COOKIE['jduser']."</p>".	
					"<p style='text-align: center;margin:10px 0px 0px 0px;padding: 1px 3px 1px 3px;color: #ffffff;font-size:15px;font-weight:bold;font-family: 微软雅黑;background-color: #00214f;'>"."IP:".$_SERVER["REMOTE_ADDR"]."</p>".
					"<p style='margin: 0px 0px 0px 0px;padding: 0px;text-align: left;color: #000000;font-size:25px;font-family: 微软雅黑;font-weight:bold;'>".$_COOKIE['jdQQ']."</p>".
				"</div>".
			"</div>".
			"<hr style='border: 3px solid #000000;padding: 0px;margin: 40px 15px 5px 15px;width: 300px;'>".
		"</div>";
	?>
	<?php
	//链接数据库
	require_once('./config.php');
	$con=login();
	if (!$con)
	{
		die('MYSQL链接失败: ' . mysqli_error());
	}
	else
	{
		//输出所有搜索结果
		$user = $_COOKIE['jduser'];
		$sql = "SELECT * FROM chat where yonghuming='$user' ";
		$result = mysqli_query($con,$sql);
		while($row = mysqli_fetch_array($result))
		{
			  echo 
			 "<div style='height: auto;width: 800px;margin:0px 0px 15px 0px;background-color: #ffffff;padding: 5px 0px 15px 0px;text-align: left;box-shadow: 0px 0px 3px #888888;border-radius: 10px;'>".
				"<div style='text-align: left;display: flex;padding: 0px 15px 0px 15px;margin:15px 0px 0px 0px;height: 60px;'>".
					"<img src='http://q1.qlogo.cn/g?b=qq&nk=".$row['QQ']."&s=640' style='width: 45px;height:45px;margin: 0px;padding: 0px;border: 1px solid #00214f;'/>".
					"<div style='margin: 0px 0px 0px 10px;'>".
						"<p style='height: 20px;margin: 0px;padding: 0px;color: #000000;font-size:17px;font-weight:bold;font-family: 微软雅黑;'>".$row['yonghuming']."</p>".	
						"<p style='text-align: center;margin:5px 0px 0px 0px;padding: 1px 3px 1px 3px;color: #ffffff;font-size:10px;font-weight:bold;font-family: 微软雅黑;background-color: #00214f;'>"."IP:".$row['ip']."</p>".
					"</div>".
				"</div>".
				"<hr style='border: 1px solid #A9A9A9;padding: 0px;margin: 0px 15px 5px 15px;'>".
				"<div style='text-align: left;padding:0px 15px 0px 15px;margin:0px;'>".
					"<p style='margin: 15px 0px 0px 0px;padding: 0px;text-align: left;color: #000000;font-size:17px;font-family: 微软雅黑;font-weight:bold;'>".$row['neirong']."</p>".
				"</div>".
				"<div style='text-align: left;display: flex;padding:0px;margin:10px 0px 0px 10px;'>".
					"<form action='liuyanyemian.php' method='post' style='width: 40px;display: flex;'>".
						"<input type='hidden' name='neirong' value='".$row['id']."'>".
						"<input style='width: 25.5px;height: 25.5px;background-color:#00214f;padding: 10px;border-radius:5px;' type='image'  src='img/delete-forever-outline.png'>".
					"</form>".
				"</div>".
			 "</div>";
		}
	}
	?>
	
	</center>
</body>
</font>
</html>
